<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>用户</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no"/>
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <link rel="stylesheet" href="/static/admin/static/component/pear/css/pear.css" />
    <link href="/static/public/libs/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/static/admin/pages/user/css/user_edit.css?v=#(version)" rel="stylesheet"/>
</head>
<body>
    <form class="layui-form" lay-filter="editForm">
        <div class="mainBox">
            <div class="main-container">
                <div class="layui-input-inline"  style="display: none;">
                    <select lay-verify="" type="hidden"></select>
                </div>
                <input type="hidden" name="id" class="layui-input" value="#(userForm.id)">
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="p-form-required">*</span>用户名:
                    </label>
                    <div class="layui-input-block">
                        <input type="text" name="userName" value="#(userForm.userName)" required lay-verify="required"
                               placeholder="请输入用户名" autocomplete="off" class="layui-input" minlength="2" maxlength="16">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="p-form-required">*</span>账户:
                    </label>
                    <div class="layui-input-block">
                        <input type="text" name="account" disabled value="#(userForm.account)" required minlength="3"
                               maxlength="12" lay-verify="required" placeholder="请输入账户" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="p-form-required">*</span>邮箱:</label>
                    <div class="layui-input-block">
                        <input type="text" name="email" placeholder="请输入邮箱" lay-verify="required" required value="#(userForm.email)" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">
                        网站:
                    </label>
                    <div class="layui-input-block">
                        <input type="text" name="website" value="#(userForm.website)" placeholder="网站或博客地址" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="p-form-required">*</span>角色:
                    </label>
                    <div class="layui-input-block">
                        <select name="roleId" lay-verify="required" id="roleId">
                        </select>
                        <p style="color: #4D4D4D">关于角色权限可参考: <a href="http://perfree.org.cn/doc/permission.html" target="_blank">权限控制</a></p>
                    </div>
                </div>
                <input type="hidden" id="role" value="#(userForm.roleId)">
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="p-form-required">*</span>状态:
                    </label>
                    <div class="layui-input-block">
                        <select name="status" lay-verify="required">
                            <option value="0" #(userForm.status == 0 ? 'selected': '')>正常</option>
                            <option value="1" #(userForm.status == 1 ? 'selected': '')>禁用</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">头像:</label>
                    <div class="layui-input-inline">
                        <input type="hidden" name="avatar" id="avatar" value="#(userForm.avatar)">
                        <div class="upload-box">
                            <div class="upload-panel #if(userForm.avatar != null && userForm.avatar != '') p-hidden #end" id="upload">
                                <i class="fa fa-upload" aria-hidden="true"></i>
                            </div>
                            <div class="upload-success-panel #if(userForm.avatar != null && userForm.avatar != '') p-show #end" id="uploadSuccessPanel">
                                <img src="#(userForm.avatar??'')">
                                <div class="delete-img-box" id="deleteImg">
                                    <i class="fa fa-trash" aria-hidden="true"></i>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="bottom">
            <div class="button-container">
                <button type="button" lay-submit lay-filter="editForm" class="pear-btn pear-btn-primary pear-btn-sm">
                    <i class="fa fa-check" aria-hidden="true"></i> 确定
                </button>
                <button type="button" class="pear-btn pear-btn-sm p-cancel-btn">
                    <i class="fa fa-close" aria-hidden="true"></i> 取消
                </button>
            </div>
        </div>
    </form>

<script src="/static/public/libs/layui-v2.5.6/layui/layui.js"></script>
<script src="/static/admin/static/component/pear/pear.js"></script>
<script src="/static/admin/pages/user/js/user_edit.js?v=#(version)"></script>
</body>
</html>